FROM python:3.11.2
COPY . /code
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
RUN pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/
WORKDIR ./code
RUN pip install -r requirement.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
EXPOSE 8002
CMD ["uvicorn", "main:app", "--reload", "--host", "0.0.0.0", "--port", "8002"]